package com.jsgt.greekfire.common.http

import com.jsgt.greekfire.bean.PoolBean
import com.jsgt.greekfire.bean.PoolOrderBean
import com.jsgt.greekfire.bean.PrivilegeBean
import com.jsgt.greekfire.bean.PrivilegeWalletBean
import okhttp3.RequestBody
import retrofit2.http.*

interface PrivilegeService {

    /**
     * 云创智/云创联 -特权收益
     */
    @GET("api/cloud/list/{type}")
    suspend fun getPrivilege(@Path("type") type: Int): ResponseData<List<PrivilegeBean>>

    /**
     * 云矿池列表
     */
    @GET("api/pool/list")
    suspend fun poolList(): ResponseData<List<PoolBean>>

    /**
     * 云创智/云创联 -钱包
     */
    @GET("api/meCloudWallet/list/{type}")
    suspend fun getPrivilegeWallet(@Path("type") type: Int): ResponseData<List<PrivilegeWalletBean>>

    /**
     * 云创智/云创联 -划转
     */
    @POST("api/meCloudWallet/toAsset")
    suspend fun privilegeWalletTransfer(@Body body: RequestBody): ResponseData<Any>


    /**
     * 转入云矿池/云矿场
     */
    @POST("api/pool/in")
    suspend fun poolIn(@Body body: RequestBody): ResponseData<Any>


    /**
     * 获取池订单列表
     */
    @GET("api/pool/page")
    suspend fun poolOrderList(@Query("type") type: String): ResponseData<ResultData<PoolOrderBean>>


    /**
     * 转出云矿池/云矿场
     */
    @POST("api/pool/out")
    suspend fun poolOut(@Body body: RequestBody): ResponseData<Any>
}